<html>
<head><meta charset="utf-8"><title>meeting 2020-07-31 · t-compiler/wg-rfc-2229 · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/index.html">t-compiler/wg-rfc-2229</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html">meeting 2020-07-31</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="205628393"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205628393" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205628393">(Jul 31 2020 at 18:57)</a>:</h4>
<p>Howdy...</p>



<a name="205628457"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205628457" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205628457">(Jul 31 2020 at 18:57)</a>:</h4>
<p>Doing good, haha</p>



<a name="205628467"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205628467" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205628467">(Jul 31 2020 at 18:57)</a>:</h4>
<p>How're you</p>



<a name="205628567"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205628567" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205628567">(Jul 31 2020 at 18:58)</a>:</h4>
<p>Just pulling in things I sent on Tuesday</p>
<p>1) This is going to be the last week of work we do before resuming late August, we entering the final exam period at our university. (Sorry, I should have probably should've brought this earlier, just didn't realize it's almost August). Current working branches:</p>
<p>Capture information bridge: <a href="https://github.com/sexxi-goose/rust/tree/use_places_aman">https://github.com/sexxi-goose/rust/tree/use_places_aman</a>.<br>
To use the bridge you need the environment variable SG_NEW, to log results/ extra details for old/new style capture analysis have SG_VERBOSE env variable.</p>
<p>Tupled upvars <a href="https://github.com/rust-lang/rust/issues/57482">#57482</a>: <a href="https://github.com/sexxi-goose/rust/pull/21#pullrequestreview-456934982">https://github.com/sexxi-goose/rust/pull/21#pullrequestreview-456934982</a></p>
<p>2) The bridge works for most cases. Issues we ran into last couple weeks are listed here <a href="#narrow/stream/122651-general/topic/Debugging.20broken.20MIR/near/205158453">https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/Debugging.20broken.20MIR/near/205158453</a><br>
We still need to make Rvalue more precise. Consider the following code</p>
<div class="codehilite"><pre><span></span><code><span class="k">struct</span> <span class="nc">X</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">str1</span>: <span class="nb">String</span><span class="p">,</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">fn</span> <span class="nf">main</span><span class="p">()</span><span class="w"></span>
<span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">X</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">str1</span>: <span class="nc">format</span><span class="o">!</span><span class="p">(</span><span class="s">&quot;x&quot;</span><span class="p">)</span><span class="w"> </span><span class="p">};</span><span class="w"></span>

<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">c</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="n">_</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">x</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="p">};</span><span class="w"></span>

<span class="w">    </span><span class="n">c</span><span class="p">();</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>


<p>We see the following place being used within the closure</p>
<p>Not upvar: PlaceWithHirId { hir_id: HirId { owner: DefId(0:3 ~ drop_move[317d]::main[0]), local_id: 43 }, place: Place { base_ty: (), base: Rvalue, projections: [] } }<br>
Rvalues currently get ignored because we don't know what gets captured. This comes back to having an expression hir id or something stored with the Rvalue.</p>
<p>Since we start capture_information and fill it up as we see Places being used, we are unable to infer the type of the closure.</p>
<p>complete error message here: <a href="http://csclub.uwaterloo.ca/~a52arora/test_suite/drop_move.log">http://csclub.uwaterloo.ca/~a52arora/test_suite/drop_move.log</a><br>
3) Tupled upvars: Tests are failing.<br>
<a href="https://github.com/sexxi-goose/rust/pull/21#pullrequestreview-456934982">https://github.com/sexxi-goose/rust/pull/21#pullrequestreview-456934982</a></p>
<p>Some places need to still check is_valid or the infcx to ensure if we need to be reading the upars tuple from the subs<br>
Expected FnPtr found closure.<br>
substs_a.as_closure().upvar_tys().next().is_none() from here<br>
feels like would return true even if there was one captured variable. We weren't able to find time to look into each failing case, so it is possible there is a mistake in the changes we made to this.</p>
<p>Errors with traits not having solutions</p>



<a name="205628855"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205628855" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205628855">(Jul 31 2020 at 19:01)</a>:</h4>
<p>reading again</p>



<a name="205628987"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205628987" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205628987">(Jul 31 2020 at 19:02)</a>:</h4>
<p>so ... that example is a bit weird</p>



<a name="205629030"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205629030" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205629030">(Jul 31 2020 at 19:03)</a>:</h4>
<p>can you easily tell what happens if you do <code>let _x = x;</code> in the closure?</p>



<a name="205629047"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205629047" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205629047">(Jul 31 2020 at 19:03)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/meeting.202020-07-31/near/205629030">said</a>:</p>
<blockquote>
<p>can you easily tell what happens if you do <code>let _x = x;</code> in the closure?</p>
</blockquote>
<p>it works fine</p>



<a name="205629054"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205629054" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205629054">(Jul 31 2020 at 19:03)</a>:</h4>
<p>in particular, <code>let _ = ...</code> has the effect of <em>ignoring</em> the result</p>



<a name="205629079"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205629079" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205629079">(Jul 31 2020 at 19:03)</a>:</h4>
<p>so actually it might be legit to say that this closure captures nothing</p>



<a name="205629084"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205629084" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205629084">(Jul 31 2020 at 19:03)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/meeting.202020-07-31/near/205629054">said</a>:</p>
<blockquote>
<p>in particular, <code>let _ = ...</code> has the effect of <em>ignoring</em> the result</p>
</blockquote>
<p>Yeah I think that is why it is an Rvalue instead of an Upvar PlaceBase</p>



<a name="205629139"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205629139" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205629139">(Jul 31 2020 at 19:04)</a>:</h4>
<p>though I don't fully understand the rvalue</p>



<a name="205629158"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205629158" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205629158">(Jul 31 2020 at 19:04)</a>:</h4>
<p>(I'm a bit surprised you get any callback at all)</p>



<a name="205629244"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205629244" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205629244">(Jul 31 2020 at 19:05)</a>:</h4>
<p>we do because InferBorrowKind is called in with all Places, regardless of PlaceBase</p>



<a name="205629280"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205629280" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205629280">(Jul 31 2020 at 19:05)</a>:</h4>
<p>let's turn to tupled upvars for a sec</p>



<a name="205629283"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205629283" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205629283">(Jul 31 2020 at 19:05)</a>:</h4>
<p>and come back to 2</p>



<a name="205629371"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205629371" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205629371">(Jul 31 2020 at 19:06)</a>:</h4>
<p>you wrote that tests are failing</p>



<a name="205629385"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205629385" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205629385">(Jul 31 2020 at 19:06)</a>:</h4>
<p>So things compile, but we still need to dig down and put more checks in places that currently are expecting that to be a tuple</p>



<a name="205629403"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205629403" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205629403">(Jul 31 2020 at 19:06)</a>:</h4>
<p>I see, they are listed in the comment?</p>



<a name="205629408"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205629408" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205629408">(Jul 31 2020 at 19:06)</a>:</h4>
<p>Yeah</p>



<a name="205629420"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205629420" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205629420">(Jul 31 2020 at 19:07)</a>:</h4>
<p>side note, if you have to stop for the rest of august, do you plan to just pick up these PRs again then?</p>



<a name="205629438"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205629438" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205629438">(Jul 31 2020 at 19:07)</a>:</h4>
<p>ok, so, some of them are ICEs</p>



<a name="205629446"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205629446" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205629446">(Jul 31 2020 at 19:07)</a>:</h4>
<p>There are ceratin erros around expecting FnPtr and some were also around two closures even with same signature or something around that lines will have differernt types</p>



<a name="205629482"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205629482" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205629482">(Jul 31 2020 at 19:07)</a>:</h4>
<p>this is from <a href="https://github.com/sexxi-goose/rust/pull/21/files">https://github.com/sexxi-goose/rust/pull/21/files</a> the diff there?</p>



<a name="205629555"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205629555" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205629555">(Jul 31 2020 at 19:08)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/meeting.202020-07-31/near/205629420">said</a>:</p>
<blockquote>
<p>side note, if you have to stop for the rest of august, do you plan to just pick up these PRs again then?</p>
</blockquote>
<p>Yeah, we will probably begin digging around again starting last week of August.</p>



<a name="205629578"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205629578" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205629578">(Jul 31 2020 at 19:08)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/meeting.202020-07-31/near/205629482">said</a>:</p>
<blockquote>
<p>this is from <a href="https://github.com/sexxi-goose/rust/pull/21/files">https://github.com/sexxi-goose/rust/pull/21/files</a> the diff there?</p>
</blockquote>
<p>yeah that's the one</p>



<a name="205629634"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205629634" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205629634">(Jul 31 2020 at 19:09)</a>:</h4>
<p>this PR looks a touch more involved than I expected</p>



<a name="205629648"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205629648" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205629648">(Jul 31 2020 at 19:09)</a>:</h4>
<p>not in a bad way necessarily</p>



<a name="205629703"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205629703" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205629703">(Jul 31 2020 at 19:10)</a>:</h4>
<p>I didn't expect <code>SplitGeneratorVarSubsts</code> to become generic, for example</p>



<a name="205629706"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205629706" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205629706">(Jul 31 2020 at 19:10)</a>:</h4>
<p>though I can maybe imagine why</p>



<a name="205629730"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205629730" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205629730">(Jul 31 2020 at 19:10)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/meeting.202020-07-31/near/205629703">said</a>:</p>
<blockquote>
<p>I didn't expect <code>SplitGeneratorVarSubsts</code> to become generic, for example</p>
</blockquote>
<p>This includes eddyb's changes</p>



<a name="205629778"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205629778" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205629778">(Jul 31 2020 at 19:11)</a>:</h4>
<p>oh, ok</p>



<a name="205629805"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205629805" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205629805">(Jul 31 2020 at 19:11)</a>:</h4>
<p>so what is the problem with adding a helper function <code>upvar_types</code>...? oh, I see</p>



<a name="205629813"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205629813" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205629813">(Jul 31 2020 at 19:11)</a>:</h4>
<p>because it would require an inference context?</p>



<a name="205629838"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205629838" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205629838">(Jul 31 2020 at 19:11)</a>:</h4>
<p>in that case we should just make it <code>self.infcx.upvar_tys(...)</code></p>



<a name="205629845"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205629845" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205629845">(Jul 31 2020 at 19:11)</a>:</h4>
<p>I suppose</p>



<a name="205629906"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205629906" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205629906">(Jul 31 2020 at 19:12)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/compare/44eff5fd7e490c0e7fb32b5fa5df7fd4e6d0633f...sexxi-goose:use_tuple_inference_for_closures">https://github.com/rust-lang/rust/compare/44eff5fd7e490c0e7fb32b5fa5df7fd4e6d0633f...sexxi-goose:use_tuple_inference_for_closures</a></p>
<p>This is just our changes</p>



<a name="205629935"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205629935" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205629935">(Jul 31 2020 at 19:12)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/meeting.202020-07-31/near/205629838">said</a>:</p>
<blockquote>
<p>in that case we should just make it <code>self.infcx.upvar_tys(...)</code></p>
</blockquote>
<p>That's the plan, I discussed this offline with Roxane, I'll leave a comment there so we don't forget</p>



<a name="205629985"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205629985" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205629985">(Jul 31 2020 at 19:12)</a>:</h4>
<p>ok</p>



<a name="205630160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205630160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205630160">(Jul 31 2020 at 19:14)</a>:</h4>
<p>I'm skimming the diff</p>



<a name="205630344"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205630344" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205630344">(Jul 31 2020 at 19:16)</a>:</h4>
<p>leaving a few comments here and there</p>



<a name="205630361"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205630361" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205630361">(Jul 31 2020 at 19:16)</a>:</h4>
<p>I guess that the ICEs are bugs</p>



<a name="205630366"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205630366" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205630366">(Jul 31 2020 at 19:16)</a>:</h4>
<p>Thank you</p>



<a name="205630367"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205630367" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205630367">(Jul 31 2020 at 19:16)</a>:</h4>
<p>I'm not sure about the stderr diffs</p>



<a name="205630469"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205630469" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205630469">(Jul 31 2020 at 19:17)</a>:</h4>
<p>so far though I'm not seeing anything obvious</p>



<a name="205630471"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205630471" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205630471">(Jul 31 2020 at 19:17)</a>:</h4>
<div class="codehilite"><pre><span></span><code>9      = note: expected fn pointer `for&lt;&#39;r&gt; fn(&amp;&#39;r str)`
-                    found closure `[closure@$DIR/closure-reform-bad.rs:10:13: 10:50 string:_]`
+                    found closure `[closure@$DIR/closure-reform-bad.rs:10:13: 10:50]`
</code></pre></div>



<a name="205630474"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205630474" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205630474">(Jul 31 2020 at 19:17)</a>:</h4>
<p>I guess I can finish this up at a different time</p>



<a name="205630490"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205630490" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205630490">(Jul 31 2020 at 19:17)</a>:</h4>
<p>yeah, ok, so that stderr looks --- not unexpeted</p>



<a name="205630492"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205630492" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205630492">(Jul 31 2020 at 19:18)</a>:</h4>
<p>I think it's fine</p>



<a name="205630508"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205630508" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205630508">(Jul 31 2020 at 19:18)</a>:</h4>
<p>This is one of the errors. what does the string:_ mean?</p>



<a name="205630547"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205630547" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205630547">(Jul 31 2020 at 19:18)</a>:</h4>
<p>what that means is</p>



<a name="205630564"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205630564" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205630564">(Jul 31 2020 at 19:18)</a>:</h4>
<p>that's supposed to be printing the type of each field corresponding to an upvar</p>



<a name="205630579"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205630579" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205630579">(Jul 31 2020 at 19:18)</a>:</h4>
<p>in this case, it's saying, we have a field for <code>string:_</code> but we don't know what its type is</p>



<a name="205630599"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205630599" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205630599">(Jul 31 2020 at 19:18)</a>:</h4>
<p>you <em>could</em> fix the diffs by having the "fallback" for not knowing the upvar tys be</p>



<a name="205630618"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205630618" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205630618">(Jul 31 2020 at 19:18)</a>:</h4>
<p>to walk over the "mentioned upvars" and print "X: _" for each one</p>



<a name="205630623"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205630623" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205630623">(Jul 31 2020 at 19:19)</a>:</h4>
<p>but that's not going to be accurate forever</p>



<a name="205630636"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205630636" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205630636">(Jul 31 2020 at 19:19)</a>:</h4>
<p>That's true</p>



<a name="205630637"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205630637" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205630637">(Jul 31 2020 at 19:19)</a>:</h4>
<p>tbh I sort of doubt that any user ever gets value from printing the upvars</p>



<a name="205630654"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205630654" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205630654">(Jul 31 2020 at 19:19)</a>:</h4>
<p>compiler hackers maybe sometimes</p>



<a name="205630655"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205630655" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205630655">(Jul 31 2020 at 19:19)</a>:</h4>
<p>True</p>



<a name="205630671"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205630671" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205630671">(Jul 31 2020 at 19:19)</a>:</h4>
<p>but I think most users are just going to be overwhelmed by that messy type :)</p>



<a name="205630699"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205630699" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205630699">(Jul 31 2020 at 19:20)</a>:</h4>
<p>so I could see a case for not printing upvars <em>at all</em> without <code>-Zverbose</code></p>



<a name="205630767"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205630767" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205630767">(Jul 31 2020 at 19:20)</a>:</h4>
<p>that would probably be something I would do in a preliminary PR, it might require an MCP or at least pinging <span class="user-mention" data-user-id="119031">@Esteban Küber</span></p>



<a name="205630780"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205630780" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205630780">(Jul 31 2020 at 19:20)</a>:</h4>
<p>That's true, I think for people working on compiler can check <code>RUSTC_LOGS=rustc_typechk::check::upvar</code></p>



<a name="205630810"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205630810" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205630810">(Jul 31 2020 at 19:20)</a>:</h4>
<p>we usually use the <code>-Zverbose</code>  option to enable kind of "debug printouts" of types</p>



<a name="205630819"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205630819" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205630819">(Jul 31 2020 at 19:20)</a>:</h4>
<p>I at least use it a lot when debugging</p>



<a name="205630844"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205630844" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205630844">(Jul 31 2020 at 19:21)</a>:</h4>
<p>but honestly I can't recall ever making use of those upvar types in a closure</p>



<a name="205630849"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205630849" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205630849">(Jul 31 2020 at 19:21)</a>:</h4>
<p>though I could imagine it being useful at some point</p>



<a name="205631146"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205631146" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205631146">(Jul 31 2020 at 19:24)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/meeting.202020-07-31/near/205630767">said</a>:</p>
<blockquote>
<p>that would probably be something I would do in a preliminary PR, it might require an MCP or at least pinging <span class="user-mention silent" data-user-id="119031">Esteban Küber</span></p>
</blockquote>
<p><a href="https://github.com/rust-lang/project-rfc-2229/issues/15">https://github.com/rust-lang/project-rfc-2229/issues/15</a></p>



<a name="205631153"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205631153" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205631153">(Jul 31 2020 at 19:24)</a>:</h4>
<p>anyway the point is</p>



<a name="205631195"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205631195" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205631195">(Jul 31 2020 at 19:24)</a>:</h4>
<p>I'll add some more details later to the issue</p>



<a name="205631209"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205631209" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205631209">(Jul 31 2020 at 19:24)</a>:</h4>
<p>any stderr output that just consists of <code>foo:_</code> not appearing in a closure type</p>



<a name="205631215"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205631215" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205631215">(Jul 31 2020 at 19:24)</a>:</h4>
<p>is probably good to be removed</p>



<a name="205631230"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205631230" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205631230">(Jul 31 2020 at 19:24)</a>:</h4>
<p>That makes sense</p>



<a name="205631301"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205631301" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205631301">(Jul 31 2020 at 19:25)</a>:</h4>
<p>I guess the diff looks good</p>



<a name="205631308"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205631308" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205631308">(Jul 31 2020 at 19:25)</a>:</h4>
<p>obviously <em>something</em> is wrong :)</p>



<a name="205631316"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205631316" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205631316">(Jul 31 2020 at 19:25)</a>:</h4>
<p>Yup haha</p>



<a name="205631323"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205631323" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205631323">(Jul 31 2020 at 19:25)</a>:</h4>
<p>I'd probably have to run it</p>



<a name="205631412"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205631412" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205631412">(Jul 31 2020 at 19:26)</a>:</h4>
<p>If u just want the builg logs they are here from the latest run: <a href="http://csclub.uwaterloo.ca/~jgwills/rust-builds/log_6265f764-3401-41f2-addd-d24060ac4cd5">http://csclub.uwaterloo.ca/~jgwills/rust-builds/log_6265f764-3401-41f2-addd-d24060ac4cd5</a></p>



<a name="205631488"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205631488" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205631488">(Jul 31 2020 at 19:26)</a>:</h4>
<p>I think we will just have to dig down the backtrack and figure out the ICEs</p>



<a name="205631511"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205631511" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205631511">(Jul 31 2020 at 19:27)</a>:</h4>
<p>One that is done I think mostly we will have the FnPtr and no solution errors</p>



<a name="205631567"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205631567" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205631567">(Jul 31 2020 at 19:27)</a>:</h4>
<blockquote>
<p>17:     0x7f4ceb1faa70 - rustc_trait_selection::traits::wf::WfPredicates::compute::h1a97f636c2bd6c3b</p>
</blockquote>



<a name="205631656"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205631656" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205631656">(Jul 31 2020 at 19:28)</a>:</h4>
<p>oh</p>



<a name="205631660"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205631660" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205631660">(Jul 31 2020 at 19:28)</a>:</h4>
<p>I see the bug</p>



<a name="205631672"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205631672" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205631672">(Jul 31 2020 at 19:28)</a>:</h4>
<p>actually I think that my suggested diffs will fix it</p>



<a name="205631675"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205631675" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205631675">(Jul 31 2020 at 19:28)</a>:</h4>
<p>but let me explain</p>



<a name="205631701"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205631701" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205631701">(Jul 31 2020 at 19:28)</a>:</h4>
<p>so you have this code</p>



<a name="205631708"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205631708" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205631708">(Jul 31 2020 at 19:28)</a>:</h4>
<div class="codehilite"><pre><span></span><code><span class="w">                    </span><span class="kd">let</span><span class="w"> </span><span class="n">ty</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="bp">self</span><span class="p">.</span><span class="n">infcx</span><span class="p">.</span><span class="n">shallow_resolve</span><span class="p">(</span><span class="n">substs</span><span class="p">.</span><span class="n">as_closure</span><span class="p">().</span><span class="n">upvar_tuple_ty</span><span class="p">());</span><span class="w"></span>
<span class="w">                    </span><span class="k">if</span><span class="w"> </span><span class="kd">let</span><span class="w"> </span><span class="n">ty</span>::<span class="n">Infer</span><span class="p">(</span><span class="n">ty</span>::<span class="n">TyVar</span><span class="p">(</span><span class="n">_</span><span class="p">))</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ty</span><span class="p">.</span><span class="n">kind</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                        </span><span class="c1">// Not yet resolved.</span>
<span class="w">                        </span><span class="bp">self</span><span class="p">.</span><span class="n">compute</span><span class="p">(</span><span class="n">ty</span><span class="p">.</span><span class="n">into</span><span class="p">());</span><span class="w"></span>
<span class="w">                    </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                        </span><span class="k">for</span><span class="w"> </span><span class="n">upvar_ty</span><span class="w"> </span><span class="k">in</span><span class="w"> </span><span class="n">substs</span><span class="p">.</span><span class="n">as_closure</span><span class="p">().</span><span class="n">upvar_tys</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
</code></pre></div>



<a name="205631731"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205631731" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205631731">(Jul 31 2020 at 19:29)</a>:</h4>
<p>the problem here is that <code>substs.as_closure().upvar_tuple_ty()</code> is going to return a <code>TyInfer</code></p>



<a name="205631743"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205631743" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205631743">(Jul 31 2020 at 19:29)</a>:</h4>
<p>you then invoke <code>shallow_resolve</code>, which resolves to a tuple</p>



<a name="205631756"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205631756" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205631756">(Jul 31 2020 at 19:29)</a>:</h4>
<p>but you ignore this tupld and instead call <code>upvar_tys</code> again</p>



<a name="205631770"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205631770" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205631770">(Jul 31 2020 at 19:29)</a>:</h4>
<p>that is going to match on the (unresolved) <code>upvar_tuple_ty</code> and fail</p>



<a name="205631777"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205631777" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205631777">(Jul 31 2020 at 19:29)</a>:</h4>
<p>so you <em>could</em> write it like</p>



<a name="205631865"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205631865" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205631865">(Jul 31 2020 at 19:30)</a>:</h4>
<div class="codehilite"><pre><span></span><code><span class="kd">let</span><span class="w"> </span><span class="n">ty</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="bp">self</span><span class="p">.</span><span class="n">infcx</span><span class="p">.</span><span class="n">shallow_resolve</span><span class="p">(</span><span class="n">substs</span><span class="p">.</span><span class="n">as_closure</span><span class="p">().</span><span class="n">upvar_tuple_ty</span><span class="p">());</span><span class="w"></span>
<span class="k">match</span><span class="w"> </span><span class="n">ty</span><span class="p">.</span><span class="n">kind</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">ty</span>::<span class="n">Infer</span><span class="p">(</span><span class="n">ty</span>::<span class="n">TyVar</span><span class="p">(</span><span class="n">_</span><span class="p">))</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="o">..</span><span class="p">.</span><span class="w"></span>
<span class="w">    </span><span class="n">ty</span>::<span class="n">Tuple</span><span class="p">(</span><span class="n">tys</span><span class="p">)</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">upvar_ty</span><span class="w"> </span><span class="k">in</span><span class="w"> </span><span class="n">tys</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="o">..</span><span class="p">.</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="w">    </span><span class="n">_</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="n">bug</span><span class="o">!</span><span class="p">()</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="205631876"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205631876" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205631876">(Jul 31 2020 at 19:30)</a>:</h4>
<p>but of course that's a mess and you should have a helper</p>



<a name="205631884"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205631884" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205631884">(Jul 31 2020 at 19:30)</a>:</h4>
<p>but also</p>



<a name="205631896"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205631896" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205631896">(Jul 31 2020 at 19:30)</a>:</h4>
<p>my suggested fix was just to do <code>self.compute(substs.as_closure().upvar_tuple_ty());</code></p>



<a name="205631913"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205631913" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205631913">(Jul 31 2020 at 19:30)</a>:</h4>
<p>in a lot of places, that will "just work"</p>



<a name="205631930"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205631930" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205631930">(Jul 31 2020 at 19:30)</a>:</h4>
<p>e.g., in this case, if you look, when you recurse and encounter a <code>ty::Infer</code>...</p>



<a name="205631941"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205631941" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205631941">(Jul 31 2020 at 19:31)</a>:</h4>
<p><a href="https://github.com/sexxi-goose/rust/blob/4d39e854cbecf3fab9067ff4e0356c899703c438/src/librustc_trait_selection/traits/wf.rs#L593">that is this line</a></p>



<a name="205631972"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205631972" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205631972">(Jul 31 2020 at 19:31)</a>:</h4>
<p>all it does is to resolve the the variable and and keep going</p>



<a name="205631973"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205631973" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205631973">(Jul 31 2020 at 19:31)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/meeting.202020-07-31/near/205631865">said</a>:</p>
<blockquote>
<div class="codehilite"><pre><span></span><code><span class="kd">let</span><span class="w"> </span><span class="n">ty</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="bp">self</span><span class="p">.</span><span class="n">infcx</span><span class="p">.</span><span class="n">shallow_resolve</span><span class="p">(</span><span class="n">substs</span><span class="p">.</span><span class="n">as_closure</span><span class="p">().</span><span class="n">upvar_tuple_ty</span><span class="p">());</span><span class="w"></span>
<span class="k">match</span><span class="w"> </span><span class="n">ty</span><span class="p">.</span><span class="n">kind</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">ty</span>::<span class="n">Infer</span><span class="p">(</span><span class="n">ty</span>::<span class="n">TyVar</span><span class="p">(</span><span class="n">_</span><span class="p">))</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="o">..</span><span class="p">.</span><span class="w"></span>
<span class="w">    </span><span class="n">ty</span>::<span class="n">Tuple</span><span class="p">(</span><span class="n">tys</span><span class="p">)</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">upvar_ty</span><span class="w"> </span><span class="k">in</span><span class="w"> </span><span class="n">tys</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="o">..</span><span class="p">.</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="w">    </span><span class="n">_</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="n">bug</span><span class="o">!</span><span class="p">()</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>


</blockquote>
<p>Maybe add this to the infcx api as the upvars_ty?</p>



<a name="205631984"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205631984" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205631984">(Jul 31 2020 at 19:31)</a>:</h4>
<p>yes, something like that</p>



<a name="205632000"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205632000" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205632000">(Jul 31 2020 at 19:31)</a>:</h4>
<p>but I think I'd still prefer my fix</p>



<a name="205632018"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205632018" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205632018">(Jul 31 2020 at 19:31)</a>:</h4>
<p>it feels a bit "cleaner" to move all the logic for "incompletely inferred" to one place</p>



<a name="205632069"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205632069" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205632069">(Jul 31 2020 at 19:32)</a>:</h4>
<p>I think that makes sense</p>



<a name="205632080"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205632080" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205632080">(Jul 31 2020 at 19:32)</a>:</h4>
<p>the idea is that 99% of the time the handling for a tuple is the same as the handling for iterating over the elements and handling each one</p>



<a name="205632096"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205632096" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205632096">(Jul 31 2020 at 19:32)</a>:</h4>
<p>there may be some exceptions but in most of the code that's true</p>



<a name="205632105"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205632105" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205632105">(Jul 31 2020 at 19:32)</a>:</h4>
<p>so instead of iterating over the upvars and processing each upvar type</p>



<a name="205632110"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205632110" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205632110">(Jul 31 2020 at 19:32)</a>:</h4>
<p>you just process the tuple type</p>



<a name="205632129"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205632129" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205632129">(Jul 31 2020 at 19:32)</a>:</h4>
<p>Sounds good, thank you</p>



<a name="205632134"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205632134" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205632134">(Jul 31 2020 at 19:32)</a>:</h4>
<p>(and maybe that is not yet inferred, and you deal with that)</p>



<a name="205632144"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205632144" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205632144">(Jul 31 2020 at 19:32)</a>:</h4>
<p>(but the code is already managing that)</p>



<a name="205632151"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205632151" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205632151">(Jul 31 2020 at 19:33)</a>:</h4>
<p>the only case I can remember where this doesn't work is</p>



<a name="205632161"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205632161" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205632161">(Jul 31 2020 at 19:33)</a>:</h4>
<p>in the trait selection code</p>



<a name="205632166"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205632166" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205632166">(Jul 31 2020 at 19:33)</a>:</h4>
<p>and it actually works there too</p>



<a name="205632182"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205632182" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205632182">(Jul 31 2020 at 19:33)</a>:</h4>
<p>but it disturbs the error message output</p>



<a name="205632193"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205632193" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205632193">(Jul 31 2020 at 19:33)</a>:</h4>
<p>because we keep a "backtrace"</p>



<a name="205632199"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205632199" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205632199">(Jul 31 2020 at 19:33)</a>:</h4>
<p>and so you wind up seeing the tuple in the backtrace</p>



<a name="205632208"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205632208" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205632208">(Jul 31 2020 at 19:33)</a>:</h4>
<p>which is a bit "surprising", like, what tuple is that?</p>



<a name="205632397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205632397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205632397">(Jul 31 2020 at 19:34)</a>:</h4>
<p>(though probably most people wouldn't even notice)</p>



<a name="205632414"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205632414" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205632414">(Jul 31 2020 at 19:35)</a>:</h4>
<p>but that is what stopped us last time</p>



<a name="205632495"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205632495" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205632495">(Jul 31 2020 at 19:35)</a>:</h4>
<p>I see, I did read about that bit in the issue</p>



<a name="205632646"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205632646" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205632646">(Jul 31 2020 at 19:36)</a>:</h4>
<p>Will probably make more sense to me when I see it happen, but I get sort of a general idea</p>



<a name="205632752"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205632752" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205632752">(Jul 31 2020 at 19:37)</a>:</h4>
<p>ok</p>



<a name="205632764"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205632764" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205632764">(Jul 31 2020 at 19:37)</a>:</h4>
<p>For the RValue concern from earlier I modified the code to be <code>let _x = x</code> and we get called with 3 Places into the closure</p>



<a name="205632765"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205632765" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205632765">(Jul 31 2020 at 19:37)</a>:</h4>
<p>so... I'm not sure if there's more we should discuss now</p>



<a name="205632772"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205632772" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205632772">(Jul 31 2020 at 19:37)</a>:</h4>
<p>I guess it's ok to let things sit for a few weeks</p>



<a name="205632775"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205632775" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205632775">(Jul 31 2020 at 19:37)</a>:</h4>
<p><a href="http://csclub.uwaterloo.ca/~a52arora/test_suite/drop_move1.log">http://csclub.uwaterloo.ca/~a52arora/test_suite/drop_move1.log</a></p>



<a name="205632826"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205632826" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205632826">(Jul 31 2020 at 19:38)</a>:</h4>
<p>jfyi I'm going to be on vacation Aug 21 - Aug 25</p>



<a name="205632845"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205632845" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205632845">(Jul 31 2020 at 19:38)</a>:</h4>
<p>is that from the example you gave earlier?</p>



<a name="205632863"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205632863" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205632863">(Jul 31 2020 at 19:38)</a>:</h4>
<p>Thanks for letting me know</p>



<a name="205632871"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205632871" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205632871">(Jul 31 2020 at 19:38)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/meeting.202020-07-31/near/205632845">said</a>:</p>
<blockquote>
<p>is that from the example you gave earlier?</p>
</blockquote>
<p>yes</p>



<a name="205632893"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205632893" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205632893">(Jul 31 2020 at 19:38)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/meeting.202020-07-31/near/205629030">said</a>:</p>
<blockquote>
<p>can you easily tell what happens if you do <code>let _x = x;</code> in the closure?</p>
</blockquote>
<p>basically did this</p>



<a name="205632904"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205632904" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205632904">(Jul 31 2020 at 19:39)</a>:</h4>
<p>src file: <a href="http://csclub.uwaterloo.ca/~a52arora/test_suite/drop_move.rs">http://csclub.uwaterloo.ca/~a52arora/test_suite/drop_move.rs</a></p>



<a name="205632933"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205632933" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205632933">(Jul 31 2020 at 19:39)</a>:</h4>
<p>OK</p>



<a name="205632974"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205632974" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205632974">(Jul 31 2020 at 19:39)</a>:</h4>
<p>so, that looks "right" to me</p>



<a name="205633001"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205633001" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205633001">(Jul 31 2020 at 19:39)</a>:</h4>
<p>I .. think ?</p>



<a name="205633006"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205633006" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205633006">(Jul 31 2020 at 19:39)</a>:</h4>
<p>yeah</p>



<a name="205633011"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205633011" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205633011">(Jul 31 2020 at 19:39)</a>:</h4>
<p>what is the output for <code>let _ = x</code> again?</p>



<a name="205633087"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205633087" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205633087">(Jul 31 2020 at 19:40)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/meeting.202020-07-31/near/205633011">said</a>:</p>
<blockquote>
<p>what is the output for <code>let _ = x</code> again?</p>
</blockquote>
<p><a href="http://csclub.uwaterloo.ca/~a52arora/test_suite/drop_move.log">http://csclub.uwaterloo.ca/~a52arora/test_suite/drop_move.log</a></p>



<a name="205633175"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205633175" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205633175">(Jul 31 2020 at 19:40)</a>:</h4>
<p>OK</p>



<a name="205633216"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205633216" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205633216">(Jul 31 2020 at 19:41)</a>:</h4>
<p>that's interesting also because</p>



<a name="205633233"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205633233" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205633233">(Jul 31 2020 at 19:41)</a>:</h4>
<p>I saw you have some logic that is just testing "does it mention any upvars"</p>



<a name="205633245"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205633245" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205633245">(Jul 31 2020 at 19:41)</a>:</h4>
<p>why do we get 3 calls into InferBorrowKind::Delegate from expr use visitor, I would've not expected the PlaceBase::Local</p>



<a name="205633248"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205633248" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205633248">(Jul 31 2020 at 19:41)</a>:</h4>
<p>but this is an example where it <em>does</em> mention upvars <em>but</em> doesn't necessarily capture them</p>



<a name="205633294"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205633294" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205633294">(Jul 31 2020 at 19:41)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/meeting.202020-07-31/near/205633233">said</a>:</p>
<blockquote>
<p>I saw you have some logic that is just testing "does it mention any upvars"</p>
</blockquote>
<p>It is looking for PlaceBase::Upvar to figure out</p>



<a name="205633298"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205633298" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205633298">(Jul 31 2020 at 19:41)</a>:</h4>
<p>though I think that's ok, we can still use "doesn't mention upvars" as the over-approximation for when a closure can be coerced to a <code>fn</code> pointer</p>



<a name="205633379"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205633379" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205633379">(Jul 31 2020 at 19:42)</a>:</h4>
<p>anyway, mmm, regarding the callbacks you get</p>



<a name="205633400"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205633400" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205633400">(Jul 31 2020 at 19:42)</a>:</h4>
<p>I only see one thing dumped in the log, which is the "consume rvalue"</p>



<a name="205633414"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205633414" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205633414">(Jul 31 2020 at 19:42)</a>:</h4>
<p>I suspect that <em>this</em> call comes from something totally unexpected</p>



<a name="205633451"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205633451" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205633451">(Jul 31 2020 at 19:42)</a>:</h4>
<p>notice that you also get it with <code>let _x = x</code></p>



<a name="205633457"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205633457" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205633457">(Jul 31 2020 at 19:42)</a>:</h4>
<blockquote>
<p>Not upvar: PlaceWithHirId { hir_id: HirId { owner: DefId(0:3 ~ drop_move[317d]::main[0]), local_id: 43 }, place: Place { base_ty: (), base: Rvalue, projections: [] } }</p>
</blockquote>



<a name="205633478"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205633478" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205633478">(Jul 31 2020 at 19:43)</a>:</h4>
<p>I think what's happening there is that the type of the <code>let ...;</code> statement is just <code>()</code></p>



<a name="205633487"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205633487" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205633487">(Jul 31 2020 at 19:43)</a>:</h4>
<p>and we are consuming that type</p>



<a name="205633493"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205633493" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205633493">(Jul 31 2020 at 19:43)</a>:</h4>
<p>or something silly like that</p>



<a name="205633501"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205633501" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205633501">(Jul 31 2020 at 19:43)</a>:</h4>
<p>maybe it's the return value from the closure, idk</p>



<a name="205633523"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205633523" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205633523">(Jul 31 2020 at 19:43)</a>:</h4>
<p>I think you're not actually getting any callbacks for the <code>let _ = x</code></p>



<a name="205633526"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205633526" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205633526">(Jul 31 2020 at 19:43)</a>:</h4>
<p>however</p>



<a name="205633532"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205633532" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205633532">(Jul 31 2020 at 19:43)</a>:</h4>
<p>I think what happened <em>before</em></p>



<a name="205633569"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205633569" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205633569">(Jul 31 2020 at 19:44)</a>:</h4>
<p>is that we "pre-initialized" the kind of capture we do for each variable to be at least "by shared ref"</p>



<a name="205633624"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205633624" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205633624">(Jul 31 2020 at 19:44)</a>:</h4>
<p>and then we "tightened" those based on what accesses we saw</p>



<a name="205633659"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205633659" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205633659">(Jul 31 2020 at 19:44)</a>:</h4>
<p>let me check again the code, but this would make us capture <code>x</code> because it was <em>mentioned</em> even though there was never really any <em>use</em> of it</p>



<a name="205633838"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205633838" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205633838">(Jul 31 2020 at 19:45)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/meeting.202020-07-31/near/205633569">said</a>:</p>
<blockquote>
<p>is that we "pre-initialized" the kind of capture we do for each variable to be at least "by shared ref"</p>
</blockquote>
<p>It's captured by value.</p>
<p><a href="http://csclub.uwaterloo.ca/~a52arora/test_suite/drop_move_og.log">http://csclub.uwaterloo.ca/~a52arora/test_suite/drop_move_og.log</a></p>
<p>This is the log using the original capture analysis</p>



<a name="205633968"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205633968" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205633968">(Jul 31 2020 at 19:46)</a>:</h4>
<p>that's a bit surprising</p>



<a name="205634000"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634000" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634000">(Jul 31 2020 at 19:46)</a>:</h4>
<p>I mean we haven't really changed the expr use visitor, right?</p>



<a name="205634016"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634016" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634016">(Jul 31 2020 at 19:46)</a>:</h4>
<p>except to track in a bit more detail which places are captured</p>



<a name="205634018"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634018" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634018">(Jul 31 2020 at 19:46)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/meeting.202020-07-31/near/205634000">said</a>:</p>
<blockquote>
<p>I mean we haven't really changed the expr use visitor, right?</p>
</blockquote>
<p>Nope</p>



<a name="205634025"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634025" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634025">(Jul 31 2020 at 19:47)</a>:</h4>
<p>do you have a dump of the callbacks we get during upvar analysis?</p>



<a name="205634045"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634045" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634045">(Jul 31 2020 at 19:47)</a>:</h4>
<p>Give me a second I can do that</p>



<a name="205634095"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634095" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634095">(Jul 31 2020 at 19:47)</a>:</h4>
<p><a href="http://csclub.uwaterloo.ca/~a52arora/test_suite/drop_move_og.log">http://csclub.uwaterloo.ca/~a52arora/test_suite/drop_move_og.log</a></p>



<a name="205634160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634160">(Jul 31 2020 at 19:48)</a>:</h4>
<p>that said, <a href="https://github.com/sexxi-goose/rust/blob/4d39e854cbecf3fab9067ff4e0356c899703c438/src/librustc_typeck/check/upvar.rs#L126-L135">here is the loop I was talking about</a></p>



<a name="205634200"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634200" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634200">(Jul 31 2020 at 19:48)</a>:</h4>
<p>ok so</p>



<a name="205634201"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634201" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634201">(Jul 31 2020 at 19:48)</a>:</h4>
<blockquote>
<p>[DEBUG rustc_typeck:<span aria-label="check" class="emoji emoji-2705" role="img" title="check">:check:</span>:upvar] adjust_upvar_borrow_kind_for_consume(place_with_id=PlaceWithHirId { hir_id: HirId { owner: DefId(0:3 ~ drop_move[317d]::main[0]), local_id: 43 }, place: Place { base_ty: (), base: Rvalue, projections: [] } }, mode=Copy)</p>
</blockquote>



<a name="205634205"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634205" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634205">(Jul 31 2020 at 19:48)</a>:</h4>
<p>that's the rvalue</p>



<a name="205634247"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634247" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634247">(Jul 31 2020 at 19:49)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/meeting.202020-07-31/near/205634160">said</a>:</p>
<blockquote>
<p>that said, <a href="https://github.com/sexxi-goose/rust/blob/4d39e854cbecf3fab9067ff4e0356c899703c438/src/librustc_typeck/check/upvar.rs#L126-L135">here is the loop I was talking about</a></p>
</blockquote>
<p>Yeah we initialize based on mentioend</p>



<a name="205634291"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634291" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634291">(Jul 31 2020 at 19:49)</a>:</h4>
<p>ah, but we do get this call</p>



<a name="205634297"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634297" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634297">(Jul 31 2020 at 19:49)</a>:</h4>
<div class="codehilite"><pre><span></span><code>[DEBUG rustc_typeck::check::upvar] adjust_upvar_borrow_kind_for_consume(place_with_id=PlaceWithHirId { hir_id: HirId { owner: DefId(0:3 ~ drop_move[317d]::main[0]), local_id: 39 }, place: Place { base_ty: X, base: Upvar(UpvarId(HirId { owner: DefId(0:3 ~ drop_move[317d]::main[0]), local_id: 1 };`x`;DefId(0:4 ~ drop_move[317d]::main[0]::{{closure}}[0]))), projections: [] } }, mode=Move)
</code></pre></div>



<a name="205634314"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634314" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634314">(Jul 31 2020 at 19:49)</a>:</h4>
<p>can you dump the same logs but in the new mode?</p>



<a name="205634388"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634388" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634388">(Jul 31 2020 at 19:50)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/meeting.202020-07-31/near/205634291">said</a>:</p>
<blockquote>
<p>ah, but we do get this call</p>
</blockquote>
<p>Sorry this is using <code>let _x = x</code><br>
and not <code>let _ = x</code></p>



<a name="205634415"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634415" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634415">(Jul 31 2020 at 19:50)</a>:</h4>
<p>lemme fix that</p>



<a name="205634425"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634425" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634425">(Jul 31 2020 at 19:50)</a>:</h4>
<p>oh, ok</p>



<a name="205634428"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634428" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634428">(Jul 31 2020 at 19:50)</a>:</h4>
<p>thanks</p>



<a name="205634449"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634449" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634449">(Jul 31 2020 at 19:50)</a>:</h4>
<p>also, I want to look briefly at your branch..</p>



<a name="205634516"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634516" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634516">(Jul 31 2020 at 19:50)</a>:</h4>
<p>original: <a href="http://csclub.uwaterloo.ca/~a52arora/test_suite/drop_move_og.log">http://csclub.uwaterloo.ca/~a52arora/test_suite/drop_move_og.log</a><br>
new: <a href="http://csclub.uwaterloo.ca/~a52arora/test_suite/drop_move.log">http://csclub.uwaterloo.ca/~a52arora/test_suite/drop_move.log</a></p>



<a name="205634569"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634569" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634569">(Jul 31 2020 at 19:51)</a>:</h4>
<p>how come I don't see <code>rustc_typeck::check::upvar</code> logs in the "new"?</p>



<a name="205634578"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634578" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634578">(Jul 31 2020 at 19:51)</a>:</h4>
<p>that said, I think I see what I expect</p>



<a name="205634605"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634605" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634605">(Jul 31 2020 at 19:51)</a>:</h4>
<p>also, I think you were wrong before -- maybe you were confusing <code>let _x = x</code> for <code>let _ = x</code></p>



<a name="205634617"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634617" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634617">(Jul 31 2020 at 19:51)</a>:</h4>
<p>i.e., we <em>do</em> capture by shared ref</p>



<a name="205634634"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634634" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634634">(Jul 31 2020 at 19:51)</a>:</h4>
<p>original</p>



<a name="205634639"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634639" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634639">(Jul 31 2020 at 19:51)</a>:</h4>
<div class="codehilite"><pre><span></span><code>upvar_capture_map: {
    UpvarId(HirId { owner: DefId(0:3 ~ drop_move[317d]::main[0]), local_id: 1 };`x`;DefId(0:4 ~ drop_move[317d]::main[0]::{{closure}}[0])): ByRef(
        UpvarBorrow(ImmBorrow, &#39;_#17r),
    ),
}
</code></pre></div>



<a name="205634650"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634650" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634650">(Jul 31 2020 at 19:51)</a>:</h4>
<p>(see the <code>ImmBorrow</code>?)</p>



<a name="205634695"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634695" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634695">(Jul 31 2020 at 19:52)</a>:</h4>
<p>so I think my hypothesis is correct</p>



<a name="205634706"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634706" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634706">(Jul 31 2020 at 19:52)</a>:</h4>
<p>and I <em>think</em> the new code is actually more correct here</p>



<a name="205634716"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634716" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634716">(Jul 31 2020 at 19:52)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/meeting.202020-07-31/near/205634569">said</a>:</p>
<blockquote>
<p>how come I don't see <code>rustc_typeck::check::upvar</code> logs in the "new"?</p>
</blockquote>
<p>fixed</p>



<a name="205634739"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634739" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634739">(Jul 31 2020 at 19:52)</a>:</h4>
<p>ok, yep, now it looks like I expect</p>



<a name="205634751"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634751" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634751">(Jul 31 2020 at 19:52)</a>:</h4>
<p>so do you see what's going on? not sure if I explained clearly :)</p>



<a name="205634776"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634776" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634776">(Jul 31 2020 at 19:53)</a>:</h4>
<p>I understand that the new code is able to recognize nothing is being used</p>



<a name="205634811"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634811" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634811">(Jul 31 2020 at 19:53)</a>:</h4>
<p>Because it doens't rely on upvars_mentioned to init but expr use/capture ananlysis</p>



<a name="205634919"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634919" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634919">(Jul 31 2020 at 19:54)</a>:</h4>
<p>right,</p>



<a name="205634926"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634926" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634926">(Jul 31 2020 at 19:54)</a>:</h4>
<p>and the old code kind of "accidentally" captures here</p>



<a name="205634960"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634960" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634960">(Jul 31 2020 at 19:54)</a>:</h4>
<p>because we "seed" the capture mode with shared borrow for everything that's mentioned</p>



<a name="205634968"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634968" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634968">(Jul 31 2020 at 19:54)</a>:</h4>
<p>if we seeded the capture mode with "no use"</p>



<a name="205634976"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634976" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634976">(Jul 31 2020 at 19:54)</a>:</h4>
<p>then it would <em>also</em> not capture <code>x</code></p>



<a name="205634998"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205634998" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205634998">(Jul 31 2020 at 19:55)</a>:</h4>
<p>but in effect your new code, because it derives all the captures from the uses, is doing that</p>



<a name="205635080"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635080" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635080">(Jul 31 2020 at 19:56)</a>:</h4>
<p>this is another thing that we <em>could</em> fix with a preliminary PR that modifies the old code to capture less, but I probably wouldn't, seems like more work than it's worth</p>



<a name="205635112"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635112" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635112">(Jul 31 2020 at 19:56)</a>:</h4>
<p>Complete guess here but</p>
<div class="codehilite"><pre><span></span><code><span class="kd">let</span><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Point</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">x</span>: <span class="mi">10</span><span class="p">,</span><span class="w"> </span><span class="n">y</span>: <span class="mi">20</span><span class="w"> </span><span class="p">};</span><span class="w"></span>
<span class="kd">let</span><span class="w"> </span><span class="n">c</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">      </span><span class="kd">let</span><span class="w"> </span><span class="n">_</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">x</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="n">p</span><span class="p">.</span><span class="n">y</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="mi">10</span><span class="p">;</span><span class="w"></span>

<span class="n">c</span><span class="p">();</span><span class="w"></span>
</code></pre></div>



<a name="205635116"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635116" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635116">(Jul 31 2020 at 19:56)</a>:</h4>
<p>(the only advantage would be isolating out that particular effect from other effects)</p>



<a name="205635140"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635140" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635140">(Jul 31 2020 at 19:56)</a>:</h4>
<p>I can probably just run but feels like this would error out, today</p>



<a name="205635154"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635154" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635154">(Jul 31 2020 at 19:56)</a>:</h4>
<p>yes I believe that will error today</p>



<a name="205635156"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635156" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635156">(Jul 31 2020 at 19:56)</a>:</h4>
<p>for the reasons we mentioned</p>



<a name="205635163"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635163" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635163">(Jul 31 2020 at 19:57)</a>:</h4>
<p>but it arguably shouldn't, even today</p>



<a name="205635174"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635174" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635174">(Jul 31 2020 at 19:57)</a>:</h4>
<p>and it <em>definitely</em> shouldn't with RFC 2229</p>



<a name="205635205"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635205" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635205">(Jul 31 2020 at 19:57)</a>:</h4>
<p>(both because there is no use, and because the "use" is a disjoint path)</p>



<a name="205635228"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635228" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635228">(Jul 31 2020 at 19:57)</a>:</h4>
<p>this is exciting</p>



<a name="205635274"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635274" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635274">(Jul 31 2020 at 19:58)</a>:</h4>
<p>the idea to create the data structure and then build the old ones from it is quite clever btw</p>



<a name="205635279"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635279" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635279">(Jul 31 2020 at 19:58)</a>:</h4>
<p>I never thought of that :)</p>



<a name="205635307"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635307" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635307">(Jul 31 2020 at 19:58)</a>:</h4>
<p>Haha yeah</p>



<a name="205635383"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635383" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635383">(Jul 31 2020 at 19:59)</a>:</h4>
<p>Actually now to land this we need to get the tuple upvars merged, because those are initalized using upvars_mentioned too</p>



<a name="205635463"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635463" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635463">(Jul 31 2020 at 20:00)</a>:</h4>
<p>and since even with this bridge we don't have the correct number of captures, we are going to have issues</p>



<a name="205635526"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635526" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635526">(Jul 31 2020 at 20:00)</a>:</h4>
<p>And for closure that don't have capture in this case we just mark them as <code>Fn</code> I guess</p>



<a name="205635590"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635590" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635590">(Jul 31 2020 at 20:01)</a>:</h4>
<p>well</p>



<a name="205635603"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635603" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635603">(Jul 31 2020 at 20:01)</a>:</h4>
<p>so I think we can land the bridge and just capture less</p>



<a name="205635607"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635607" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635607">(Jul 31 2020 at 20:01)</a>:</h4>
<p>that seems ok</p>



<a name="205635624"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635624" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635624">(Jul 31 2020 at 20:01)</a>:</h4>
<p>I think the msot interesting part, which I hadn't anticipated, is that the coercions are decided based on <em>upvars mentioned</em></p>



<a name="205635632"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635632" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635632">(Jul 31 2020 at 20:01)</a>:</h4>
<p>which is an overapproximation</p>



<a name="205635635"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635635" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635635">(Jul 31 2020 at 20:01)</a>:</h4>
<p>but I think that's ok</p>



<a name="205635647"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635647" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635647">(Jul 31 2020 at 20:01)</a>:</h4>
<p>we should be taking some notes though, it is significant for attempts to specify the language</p>



<a name="205635753"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635753" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635753">(Jul 31 2020 at 20:03)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/meeting.202020-07-31/near/205635624">said</a>:</p>
<blockquote>
<p>I think the msot interesting part, which I hadn't anticipated, is that the coercions are decided based on <em>upvars mentioned</em></p>
</blockquote>
<p>Actually not sure what the best way to resolve this would be, because that code runs before the capture analysis.</p>



<a name="205635762"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635762" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635762">(Jul 31 2020 at 20:03)</a>:</h4>
<p>we should make a file in the repo where we track "lang spec" that we are evolving</p>



<a name="205635771"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635771" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635771">(Jul 31 2020 at 20:03)</a>:</h4>
<p>I think you resolved it correctly</p>



<a name="205635775"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635775" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635775">(Jul 31 2020 at 20:03)</a>:</h4>
<p>I just want to note it</p>



<a name="205635793"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635793" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635793">(Jul 31 2020 at 20:03)</a>:</h4>
<p>I mean this <code>let _ = x</code> thing is really an edge-case</p>



<a name="205635801"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635801" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635801">(Jul 31 2020 at 20:03)</a>:</h4>
<p>Other than changing the order in which things happen, but I don't have enough context on why they happen in that order today to make any valuable comments</p>



<a name="205635806"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635806" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635806">(Jul 31 2020 at 20:03)</a>:</h4>
<p>that said</p>



<a name="205635813"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635813" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635813">(Jul 31 2020 at 20:03)</a>:</h4>
<p>I think we could perhaps refine this later</p>



<a name="205635827"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635827" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635827">(Jul 31 2020 at 20:03)</a>:</h4>
<p>i.e., we could say that closures can <em>always</em> be coerced to <code>fn</code> pointers <em>but</em></p>



<a name="205635838"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635838" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635838">(Jul 31 2020 at 20:04)</a>:</h4>
<p>it creates an "no capture obligation"</p>



<a name="205635885"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635885" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635885">(Jul 31 2020 at 20:04)</a>:</h4>
<p>that goes itno the trait system and which we resolve later once we know the upvars</p>



<a name="205635888"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635888" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635888">(Jul 31 2020 at 20:04)</a>:</h4>
<p>that would work out fine</p>



<a name="205635924"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635924" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635924">(Jul 31 2020 at 20:04)</a>:</h4>
<p>I guess that's a better approach really, but maybe we should open an issue to represent it</p>



<a name="205635932"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635932" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635932">(Jul 31 2020 at 20:04)</a>:</h4>
<p>for now I would go with the upvars-mentioned approach</p>



<a name="205635938"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205635938" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205635938">(Jul 31 2020 at 20:04)</a>:</h4>
<p>it's not the interesting probelm</p>



<a name="205636116"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636116" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636116">(Jul 31 2020 at 20:06)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/meeting.202020-07-31/near/205635885">said</a>:</p>
<blockquote>
<p>that goes itno the trait system and which we resolve later once we know the upvars</p>
</blockquote>
<p>Would there be no upvars if we coerce it to a fn ptr?</p>



<a name="205636135"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636135" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636135">(Jul 31 2020 at 20:06)</a>:</h4>
<p>right</p>



<a name="205636138"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636138" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636138">(Jul 31 2020 at 20:07)</a>:</h4>
<p>you can't make a function pointer if there are upvars</p>



<a name="205636153"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636153" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636153">(Jul 31 2020 at 20:07)</a>:</h4>
<p>beacuse a function pointer doesn't carry any environment</p>



<a name="205636157"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636157" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636157">(Jul 31 2020 at 20:07)</a>:</h4>
<p>so it has no state</p>



<a name="205636205"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636205" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636205">(Jul 31 2020 at 20:07)</a>:</h4>
<p>OOOOH</p>



<a name="205636214"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636214" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636214">(Jul 31 2020 at 20:08)</a>:</h4>
<p>I see</p>



<a name="205636265"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636265" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636265">(Jul 31 2020 at 20:08)</a>:</h4>
<p>we start by saying that this will be an fn Ptr for all closures</p>



<a name="205636271"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636271" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636271">(Jul 31 2020 at 20:08)</a>:</h4>
<p>and then resolve it later in TraitSelction</p>



<a name="205636299"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636299" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636299">(Jul 31 2020 at 20:08)</a>:</h4>
<p>to see if that assumption was correct else revert it to just being a closure?</p>



<a name="205636307"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636307" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636307">(Jul 31 2020 at 20:08)</a>:</h4>
<p>Or something along these lines?</p>



<a name="205636331"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636331" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636331">(Jul 31 2020 at 20:09)</a>:</h4>
<p>yeah</p>



<a name="205636336"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636336" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636336">(Jul 31 2020 at 20:09)</a>:</h4>
<p>we would have to add a new kind of predicate</p>



<a name="205636371"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636371" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636371">(Jul 31 2020 at 20:10)</a>:</h4>
<p>similar to <a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/enum.PredicateAtom.html#variant.ClosureKind"><code>ClosureKind</code></a> today</p>



<a name="205636431"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636431" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636431">(Jul 31 2020 at 20:10)</a>:</h4>
<p>it would be like <code>ClosureNoUpvars(DefId, SubstsRef&lt;'tcx&gt;)</code></p>



<a name="205636450"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636450" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636450">(Jul 31 2020 at 20:10)</a>:</h4>
<p>and basically so long as the upvars are not inferred, we couldn't prove it to be true</p>



<a name="205636453"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636453" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636453">(Jul 31 2020 at 20:10)</a>:</h4>
<p>but once the upvars are known, we can</p>



<a name="205636479"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636479" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636479">(Jul 31 2020 at 20:10)</a>:</h4>
<p>you can't always do this trick, because it would cause us to do more coercions, which might alter the control-flow in other ways,</p>



<a name="205636483"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636483" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636483">(Jul 31 2020 at 20:11)</a>:</h4>
<p>but I think in this case it would be fine</p>



<a name="205636490"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636490" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636490">(Jul 31 2020 at 20:11)</a>:</h4>
<p>because if the coercion doesn't fire, you're going to get an error anyway</p>



<a name="205636510"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636510" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636510">(Jul 31 2020 at 20:11)</a>:</h4>
<p>so it's not like it's going to change how code compiles</p>



<a name="205636549"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636549" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636549">(Jul 31 2020 at 20:11)</a>:</h4>
<p>But we wouldn't know we are in this case until we have done the capture analysis</p>



<a name="205636650"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636650" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636650">(Jul 31 2020 at 20:12)</a>:</h4>
<p>I feel like I'm missing something</p>



<a name="205636728"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636728" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636728">(Jul 31 2020 at 20:13)</a>:</h4>
<p>My understanding was we start with ClosureNoUpvars(defId)</p>
<p>we do capture analysis and turn that into ClosureKind(def id, substs) in trait selection if we have upvars and FnPtr if it doesn't</p>



<a name="205636806"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636806" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636806">(Jul 31 2020 at 20:14)</a>:</h4>
<p>no</p>



<a name="205636817"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636817" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636817">(Jul 31 2020 at 20:14)</a>:</h4>
<p>what you're missing is how the "fulfillment context" works</p>



<a name="205636822"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636822" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636822">(Jul 31 2020 at 20:14)</a>:</h4>
<p>which is part of the trait system implementation sort of</p>



<a name="205636831"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636831" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636831">(Jul 31 2020 at 20:14)</a>:</h4>
<p>it basically has a llist of "obligations" (predicates that must be proven true)</p>



<a name="205636849"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636849" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636849">(Jul 31 2020 at 20:14)</a>:</h4>
<p>the id eawould be that we do the coercion and we add this obligation into that list</p>



<a name="205636851"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636851" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636851">(Jul 31 2020 at 20:14)</a>:</h4>
<p>and it just stays there</p>



<a name="205636871"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636871" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636871">(Jul 31 2020 at 20:15)</a>:</h4>
<p>already we have code that tries to prove things in the list true and stops if they contain uninferred variables</p>



<a name="205636885"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636885" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636885">(Jul 31 2020 at 20:15)</a>:</h4>
<p>at some point, we would do the upvar inference -- this can happen while there are still things in that list, it's ok</p>



<a name="205636895"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636895" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636895">(Jul 31 2020 at 20:15)</a>:</h4>
<p>well, we may error out today, I'm not sure, but I think not</p>



<a name="205636906"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636906" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636906">(Jul 31 2020 at 20:15)</a>:</h4>
<p>if we do, we could stop ourselves from doing so :P</p>



<a name="205636918"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636918" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636918">(Jul 31 2020 at 20:15)</a>:</h4>
<p>then, once upvar inference is done, we go back and check that we can prove the predicate <em>now</em></p>



<a name="205636940"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636940" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636940">(Jul 31 2020 at 20:15)</a>:</h4>
<p>we could also do this without the fulfilmment context, and just keep a list somewhere</p>



<a name="205636984"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636984" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636984">(Jul 31 2020 at 20:16)</a>:</h4>
<p>of closures that we assumed to capture nothing</p>



<a name="205636994"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205636994" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205636994">(Jul 31 2020 at 20:16)</a>:</h4>
<p>i.e., in the <code>FnCtxt</code></p>



<a name="205637001"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205637001" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205637001">(Jul 31 2020 at 20:16)</a>:</h4>
<p>and then after upvar inference we go back over that list</p>



<a name="205637016"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205637016" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205637016">(Jul 31 2020 at 20:16)</a>:</h4>
<p>that's probably better really</p>



<a name="205637021"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205637021" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205637021">(Jul 31 2020 at 20:16)</a>:</h4>
<p>no need to abuse the trait system</p>



<a name="205637051"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205637051" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205637051">(Jul 31 2020 at 20:16)</a>:</h4>
<p>(well, it depends, eventually, i'd like to move coercions and things into the trait system as predicates, and then it would make sense)</p>



<a name="205637176"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205637176" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205637176">(Jul 31 2020 at 20:18)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/meeting.202020-07-31/near/205636984">said</a>:</p>
<blockquote>
<p>of closures that we assumed to capture nothing</p>
</blockquote>
<p>That would only work for upvars_mentioned being None. I guess what I'm missing is how we are making this assumption for something like</p>
<div class="codehilite"><pre><span></span><code>|| {
    let _ = x;
}
</code></pre></div>


<p>before the capture analysis</p>



<a name="205637201"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205637201" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205637201">(Jul 31 2020 at 20:18)</a>:</h4>
<p>well if you had some code like this</p>



<a name="205637220"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205637220" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205637220">(Jul 31 2020 at 20:18)</a>:</h4>
<div class="codehilite"><pre><span></span><code><span class="kd">let</span><span class="w"> </span><span class="n">c</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="kd">let</span><span class="w"> </span><span class="n">_</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">x</span><span class="p">;</span><span class="w"> </span><span class="p">};</span><span class="w"></span>
<span class="kd">let</span><span class="w"> </span><span class="n">p</span>: <span class="nc">fn</span><span class="p">()</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">c</span><span class="p">;</span><span class="w"></span>
</code></pre></div>



<a name="205637228"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205637228" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205637228">(Jul 31 2020 at 20:18)</a>:</h4>
<p>the <code>let p: fn() = c</code> is going to need to decide whether the coercion is legal</p>



<a name="205637237"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205637237" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205637237">(Jul 31 2020 at 20:18)</a>:</h4>
<p><em>today</em> it checks upvar's mentioned and decides immediately</p>



<a name="205637254"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205637254" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205637254">(Jul 31 2020 at 20:19)</a>:</h4>
<p>what I would propose is that it says "yes, tentatively legal" and then records the closure for later to check</p>



<a name="205637267"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205637267" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205637267">(Jul 31 2020 at 20:19)</a>:</h4>
<p>then we do the type-check, we run the upvar inference, and after that, we can go back and verify</p>



<a name="205637281"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205637281" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205637281">(Jul 31 2020 at 20:19)</a>:</h4>
<p>the user can't really tell the difference except for the order in which errors are emitted, basically</p>



<a name="205637296"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205637296" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205637296">(Jul 31 2020 at 20:19)</a>:</h4>
<p>(we could still check upvars-mentioned too, of course, as an optimiztion)</p>



<a name="205637303"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205637303" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205637303">(Jul 31 2020 at 20:19)</a>:</h4>
<p>(but not worth it, this is an edge case)</p>



<a name="205637311"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205637311" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205637311">(Jul 31 2020 at 20:19)</a>:</h4>
<p>Okay I mis understood what coercion was doing</p>



<a name="205637522"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205637522" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205637522">(Jul 31 2020 at 20:22)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/meeting.202020-07-31/near/205637220">said</a>:</p>
<blockquote>
<div class="codehilite"><pre><span></span><code><span class="kd">let</span><span class="w"> </span><span class="n">c</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="kd">let</span><span class="w"> </span><span class="n">_</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">x</span><span class="p">;</span><span class="w"> </span><span class="p">};</span><span class="w"></span>
<span class="kd">let</span><span class="w"> </span><span class="n">p</span>: <span class="nc">fn</span><span class="p">()</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">c</span><span class="p">;</span><span class="w"></span>
</code></pre></div>


</blockquote>
<p>Should this generate a warning for the user?</p>



<a name="205637653"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205637653" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205637653">(Jul 31 2020 at 20:23)</a>:</h4>
<p>I don't think so</p>



<a name="205637669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205637669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205637669">(Jul 31 2020 at 20:23)</a>:</h4>
<p>you mean because they sort of <em>almost capture</em> <code>x</code>?</p>



<a name="205637686"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205637686" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205637686">(Jul 31 2020 at 20:23)</a>:</h4>
<p>I was thinking from an unsued capture yeah</p>



<a name="205637745"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205637745" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205637745">(Jul 31 2020 at 20:24)</a>:</h4>
<p>well, my thinking is that there may be macros or things</p>



<a name="205637768"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205637768" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205637768">(Jul 31 2020 at 20:24)</a>:</h4>
<p>where you generate <code>let _ = ...</code> intentionally so as not to capture</p>



<a name="205637774"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205637774" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205637774">(Jul 31 2020 at 20:24)</a>:</h4>
<p>something that happens</p>



<a name="205637790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205637790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205637790">(Jul 31 2020 at 20:24)</a>:</h4>
<p>i.e., for whatever reason, you have to generate a line for every variable, but you only want to capture some of them</p>



<a name="205637792"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205637792" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205637792">(Jul 31 2020 at 20:24)</a>:</h4>
<p>Ah</p>



<a name="205637810"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205637810" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205637810">(Jul 31 2020 at 20:24)</a>:</h4>
<p>I mean it's totally theoretical...</p>



<a name="205637816"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205637816" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205637816">(Jul 31 2020 at 20:24)</a>:</h4>
<p>...anyway, a lint might also be ok, I don't have a strong opinion</p>



<a name="205637825"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205637825" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205637825">(Jul 31 2020 at 20:24)</a>:</h4>
<p>(a macro could disable the lint)</p>



<a name="205637923"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205637923" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205637923">(Jul 31 2020 at 20:26)</a>:</h4>
<p>ok, so, seems like we cleared up various things, anything else?</p>



<a name="205637924"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205637924" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205637924">(Jul 31 2020 at 20:26)</a>:</h4>
<p>I guess that's fair</p>



<a name="205637962"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205637962" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205637962">(Jul 31 2020 at 20:26)</a>:</h4>
<p>this was a long meeting but it was productive :)</p>



<a name="205637973"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205637973" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205637973">(Jul 31 2020 at 20:26)</a>:</h4>
<p>I wish you all good luck on your exams btw! <span aria-label="fingers crossed" class="emoji emoji-1f91e" role="img" title="fingers crossed">:fingers_crossed:</span></p>



<a name="205637975"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205637975" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205637975">(Jul 31 2020 at 20:26)</a>:</h4>
<p>Yup, thank you :)</p>



<a name="205638040"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205638040" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205638040">(Jul 31 2020 at 20:27)</a>:</h4>
<p>I'll start a doc, with some of the details we dicussed today</p>



<a name="205647214"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-31/near/205647214" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-31.html#205647214">(Jul 31 2020 at 22:14)</a>:</h4>
<p><span class="user-mention silent" data-user-id="281950">Aman Arora</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/meeting.202020-07-31/near/205638040">said</a>:</p>
<blockquote>
<p>I'll start a doc, with some of the details we dicussed today</p>
</blockquote>
<p><a href="https://github.com/rust-lang/project-rfc-2229/pull/16">https://github.com/rust-lang/project-rfc-2229/pull/16</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>